import axios from '@/libs/api.request'

export const getArticleList = ({id, title, pageId}) => {
  return axios.request({
    url: 'Article/getArticleList',
    method: 'post',
    data: {id, title, pageId}
  })
}

export const editArticle = ({id, title, picture, content}) => {
  const data = {id, title, picture, content}
  return axios.request({
    url: 'Article/editArticle',
    data,
    method: 'post'
  })
}

export const getArticleDetail = (id) => {
  return axios.request({
    url: 'Article/getArticleDetail',
    data: {id},
    method: 'post'
  })
}

export const delArticle = (id) => {
  return axios.request({
    url: 'Article/delArticle',
    data: {id},
    method: 'post'
  })
}
